﻿@model Downloader.Framework.Queries.RecordList<Downloader.Web.Controllers.ViewModels.CategoryViewModel>
<table id="tbdatalist" pageindex="@Model.PageIndex" pagecount="@Model.PageCount" pagesize="@Model.PageSize"  class="tableBorder tableBorder-thcenter" width="100%" cellspacing="0" cellpadding="0" border="1">
    <tr class="color1">
        <th></th>
        <th>序号
        </th>
        <th>key
        </th>
        <th>名称
        </th>
        <th>介绍
        </th>
        <th>排序
        </th>
        <th>操作
        </th>
    </tr>
    @{ 
        var i = 0;
        foreach (var category in Model.Data)
        {
       
        <tr  class= "color@((i + 1) % 2 + 2)">
            @if (category.IsSub)
            {
                <td align="center">
                    <img width="19" alt="" src="../../../../Content/images/adminicons/arrow_turn_right.png" />

                </td>
            }
            else
            { 
                <td align="center">
                    <img width="19" alt="" src="../../../../Content/images/adminicons/folder.png" />

                </td>
               
            }

            <td>@(i + 1)
            </td>
            <td>@category.Id
            </td>
            <td>@category.Name
            </td>
            <td>@category.Introduction
            </td>
            <td>@category.Sequence
            </td>
            <td>

                @Html.ActionLink("修改", "Edit", "Category", new { id = category.Id }, new { @class = "edit" })
                @Html.ActionLink("删除", "Dele", "Category", new { id = category.Id }, new { @class = "dele" })
            </td>
        </tr>
                
            i++;
        }
    }
</table>
